import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const Login=()=>import('../views/login/Login')
const Home=()=>import('../views/Home')
const User=()=>import('views/users/User')
const Rights=()=>import('views/power/rights/Rights')
const Role=()=>import('views/power/roles/Role')
const BlankPage=()=>import('views/BlankPage')
const Category=()=>import('views/categories/Category')
const GoodParams=()=>import('views/goods_params/GoodsParams')
const GoodsList=()=>import('views/goods_list/GoodsList')
const Add=()=>import('views/goods_list/goodslistChildren/Add')
const Order=()=>import('../components/order/Order')
const SoftWare=()=>import('../components/software/SoftWare')
const Notice=()=>import('../components/notice/Notice')
const Solution=()=>import('../components/solution/Solution')
const routes = [
  {
    path:'/',
    redirect:'/login'
  },
  {
    path:'/login',
    component:Login
  },
  {
    path:'/home',
    redirect:'/home/notice',
    component:Home,
    meta:{
      index:0,
      showFooter:true
    },
    children:[
      {
        path:'users',
        component:User
      },
      {
        path:'rights',
        component:Rights
      },
      {
        path:'roles',
        component:Role
      },
      {
        path:'role',
        component:BlankPage
      },
      {
        path:'categories',
        component:Category
      },
      {
        path:'params',
        component:GoodParams
      },
      {
        path:'goods',
        component:GoodsList
      },
       {
          path:'goods/addgoods',
          component:Add
        },
        {
          path:'orders',
          component:Order,
        },
       
        ,{
          path:'yzxm',
          component:SoftWare
        },
        {
          path:'notice',
          component:Notice
        },
        {
          path:"solution",
          component:Solution
        },
        {
          path:'*',
          component: () => import('../views/si-o-si/SioSi')
        }
]
  }
]

const router = new VueRouter({
  routes
})

export default router
